﻿jsFrontend = 
{
    debug: false,

    init: function() 
    {
        jsFrontend.initAjax();
        jsFrontend.controls.init();
        jsFrontend.forms.init();
        jsFrontend.gravatar.init();
        jsFrontend.search.init();
    },

    initAjax: function()
    {
        // set defaults for AJAX
        $.ajaxSetup(
        {
            url: '/frontend/ajax.php',
            cache: false,
            type: 'POST',
            dataType: 'json',
            timeout: 10000,
            data: { fork: { module: null, action: null, language: jsFrontend.current.language } }
        });
    }
}

... 

$(jsFrontend.init);